// var src = "http://120.25.241.174:8080/v1/servicetype/";
//var src = "http://192.168.4.57:8080/v1/";

function getApiPath() {

    var ipsrc = fkpConfig.apiip;
    var port = fkpConfig.port;

    var src = ipsrc + port;
    return {
        base: src,
        dirs: {
            wx_token: 'https://api.weixin.qq.com/cgi-bin/token',   //不要动这个
            wx_web_token: 'https://api.weixin.qq.com/sns/oauth2/access_token',  //不要动这个
            //快递寄件
            // userInfoNotes: src+'/send/userInfoNotes',
            userInfoNotes: src+'/send/sendExpressHtmlData',
            weixinShippment: src+'/send/weixinShippment',
            getBookTime: src+'/send/getBookTime',
            // pkgSendDetail: src+'/pkgSend/pkgSendDetail',
            pkgSendDetail: src+'pkgSend/pkgSendOrderDetail',
            getSiteMaintainInfoByApp: src+'/provider/getSiteMaintainInfoByApp',
            updateReceiveSmsStatus: src+'/user/updateReceiveSmsStatus',
            cancelShippment: src+'/send/cancelWeiXinShippment',

            //java端获取微信签名
            // @url {String}
            // http://dev.dabai360.com/wiki/index.php/7.%E8%8E%B7%E5%8F%96%E5%BE%AE%E4%BF%A1js%E7%AD%BE%E5%90%8D%E6%8E%A5%E5%8F%A3
            javaWxSignature: src+'/weixin/api/jssignature',


            // 拿取验证码
            get_mms: src+'/user/sendCheckSms',

            // http://dev.dabai360.com/imapi/user/checkCode
            bind_wx: src+'/user/checkCode',

            //解除微信绑定
            // @login {String}
            unbind_wx: src+'/user/unbind',

            //用户信息
            /*
             * @login {String}  用户token
            */
            userInfo: src+'/user/userCenter',
            // userInfo response:
            // "{
            //     "address":null,
            //     "currentCommunity":{
            //         "address":"",
            //         "cityId":"440100",
            //         "cityName":"广州市",
            //         "communityId":"1",
            //         "communityName":"君华香柏广场",
            //         "districtId":"440111",
            //         "districtName":"白云区",
            //         "downTownId":"",
            //         "downTownName":"",
            //         "dscd":"",
            //         "fullAddress":"",
            //         "provinceId":"440000",
            //         "provinceName":"广东省",
            //         "userId":"","userName":""
            //     },
            //     "hasCommunityVipPkg":true,
            //     "invitationCode":"",
            //     "isReceiveSms":false,
            //     "member":{
            //         "btnName":"购买",
            //         "buyUrl":"/imapi/h5/vipH5.html?btn=1&packageId=dbe6f430841841cb96a9bd901b588ab5&login=619e03fcee4c40aa93839c7e072fb92a",
            //         "expireTime":"",
            //         "iconUrlM":"/imapi/h5/static/img/GOLD_MEMBER_M.png",
            //         "iconUrlS":"",
            //         "introduceUrl":"/imapi/h5/vipH5.html?packageId=dbe6f430841841cb96a9bd901b588ab5",
            //         "memberName":"金牌会员",
            //         "memberType":"GOLD_MEMBER"
            //     },
            //     "mobile":"13268280401",
            //     "photoUrl":"",
            //     "sitePhone":"13316099512",
            //     "unReadMsgTotal":0,
            //     "userName":"",
            //     "vip":false
            // }"


            //更新用户名
            // @login {String}   用户token
            // @userName  {String}   用户名
            updataUserName: src+'/user/weixinUpdateUserName',



            // 邀请码添加
            //http://dev.dabai360.com/wiki/index.php/25.%E9%82%80%E8%AF%B7%E7%A0%81%E6%B7%BB%E5%8A%A0
            // @login   {String}
            // @invitationCode   {String}   要请码
            // @uniqueIdentifier   {String}  	唯一码
            weixinSaveInvitationCode: src+'user/weixinSaveInvitationCode',

            // 包裹详情
            // @pkgReceiveId {String}
            findLogPkgReceive: src+'expressBusinessPcContoller/findLogPkgReceive',



            listCardByPage: src+'/myCard/listCardByPage',    //卡券列表
            getAllCity: src+'/user/getAllCity',             //所有城市
            getCommunity: src+'/user/getCommunity',         //某城市所有的小区   {cityId: String}

            //设置用户的小区
            //weixinSwitchCommunity
            // http://dev.dabai360.com/wiki/index.php/12.%E5%88%87%E6%8D%A2%E5%B0%8F%E5%8C%BA%E6%8E%A5%E5%8F%A3
            weixinSwitchCommunity: src+'/user/weixinSwitchCommunity',    //{currentCommunityId: String}

            //用户地址接口
            //getListUserAddress
            /*
             * @login {String}   用户token
            */
            getListUserAddress: src+'/userAddressController/getListUserAddress2',

            // 根据id获取用户地址接口
            // @login {String}
            // @addressId {String}
            getUserAddressById: src+'/userAddressController/getUserAddressById',



            //删除用户地址
            // @login {String}
            // @id {String}
            deleteUserAddress: src+'/userAddressController/weixinDeleteUserAddress',


            // 设置默认地址
            // @login {String}
            // @id {String}
            setAddressToDefault: src+'/userAddressController/setAddressToDefault',




            //创建 修改用户地址
            //createUserAddress
            /*
             * @communityName {String}   小区名称
             * @communityId   {String}   小区ID
             * @dscd   {String}   小区行政编码
             * @address   {String}   详细地址
             * @contact   {String}   联系人
             * @contactPhone   {String}   联系人电话号码
             * @isDefaultAdd   {String}   //默认地址     1  默认地址    0 非默认地址

             * 必传 contact communityId  communityName  contactPhone address
            */
            createUserAddress: src+'/userAddressController/createUserAddress',

            //订单
            //http://dev.dabai360.com/wiki/index.php/%E7%94%A8%E6%88%B7%E6%9F%A5%E7%9C%8B%E8%AE%A2%E5%8D%95%E5%88%97%E8%A1%A8%E6%8E%A5%E5%8F%A3_1.7.0_limh
            myOrderList: src+'/order/app/myOrderList',       //订单列表



            // 个人中心-
            messageList: src+'message/center/getMsgListByApp',
            messageDetail: src+'message/center/getMsgDetail',
            locationCommunitys: src+'/community/locationCommunitys',                //根据经纬度获取小区接口

            coupons: src+'/buySku/userPurchaserWaterList',                          //已购买的卡劵列表



            //代收包裹列表
            // unsigned: src+ '/expressUserController/userPkgList/UNSIGNED',

            // orderInfo:src+ "/express/client/getOrderInfo",
            orderInfo:src+ "/expressUserController/pkgHtmlData",                    //收件初始化查询接口

            exp_order:src+'/express/client/weixinGeneratePkgBookOrder',             //收件的结算接口
            exp_finish:src+'/expressOrderController/pkgOrderDetail',
            evaluateSubmit:src + '/order/app/userComment',
            exp_log:src + '/orderLog/history',
            //水卡列表
            card_list: src+'/buyCard/listCard',     //水卡列表
            buyWaterCard: src+'/buyCard/buyWaterCard',     //水卡支付
            //预约送水
            waterHtmlData: src+'/buySku/waterHtmlData',     //预约送水提交前界面的显示
            watersendOrder: src+'/skuByCard/createWeiXinSkuOrderByCard',     //提交预约送水订单
            //预约送水提交后的订单详情
            wsOrderdetails: src+'/buySku/waterOrderDetail',     //预约送水订单详情

            Ordercomments: src+'/order/weixin/toEvaluate',     //所有订单详情中的提交评论接口
            Ordercomments_off: src+'/order/evaluate',     //所有订单详情中的已评论接口

            //订单日志
            orderLog: src+'/orderLog/history',     //预约送水-日志

            onlineInfo: src+ '/provider/siteMaintainInfo',        //服务里获取便民社区中的网店介绍

        },

        weixin: {
            //oauth2方式的api会议 '_web' 方式结尾
            userlist: 'https://api.weixin.qq.com/cgi-bin/user/get',
            querymenu: 'https://api.weixin.qq.com/cgi-bin/menu/get',        //?access_token=ACCESS_TOKEN
            createmenu: 'https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN',    //?access_token=ACCESS_TOKEN
            getticket: 'https://api.weixin.qq.com/cgi-bin/ticket/getticket',            //?access_token=ACCESS_TOKEN&type=jsapi
            userinfo_web: 'https://api.weixin.qq.com/sns/userinfo'  //?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN
        }
    }
}


module.exports = getApiPath
